home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
bisonpcb
/
tgram.doc
< prev
next >
Wrap
Text File
|
1987-02-06
|
948b
|
29 lines
I tried your bison.exe file on tgram.y (included in this arc), and
it almost worked. allocate() (in allocate.c) complains at one point; I
found the same problem with my attempt. This is probably due to the
code appearing below, taken from output.c. MAXTABLE is defined to be
32767 at the top of output.c, and so allocate is (through calloc())
trying to allocate arrays just short of 64k in size (64k=65536 =
32768*2<--sizeof(short)). Please try the largest model compilation you
can manage, and hopefully this problem will disappear.
To test bison, type
bison tgram.y ( <-' )
Good luck!
FROM OUTPUT.C:
pack_table()
{
register int i;
register int place;
register int state;
base = NEW2(nvectors, short);
pos = NEW2(nentries, short);
table = NEW2(MAXTABLE, short); <--- NEW2 is defined in terms of allocate()
check = NEW2(MAXTABLE, short); <-